package com.jayqqaa12.abase.core.activity;

import android.os.Bundle;
import android.support.v7.app.ActionBarActivity;

import com.jayqqaa12.abase.core.Abus;

import org.androidannotations.annotations.AfterInject;
import org.androidannotations.annotations.AfterViews;
import org.androidannotations.annotations.Bean;
import org.androidannotations.annotations.EActivity;

@EActivity
public class AActivity extends ActionBarActivity {
    @Bean
    protected Abus bus;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        bus.register(this);
    }

    @Override
    protected void onDestroy() {
        super.onDestroy();
        bus.unregister(this);
    }

    @AfterInject
    protected void afterInject() {

    }


    @AfterViews
    protected void afterView() {
        init();
        connect();
    }

    protected void init() {
    }

    /**
     * 填充数据 连接网络等
     */
    protected void connect() {

    }

}
